home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
termsorc.lha
/
Extras
/
Source
/
gtlayout-source.lha
/
LTP_Delay.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-24
|
898b
|
40 lines
/* GadTools layout toolkit
**
** Copyright © 1993-1995 by Olaf `Olsen' Barthel
** Freely distributable.
*/
#include "gtlayout_global.h"
VOID __regargs
LTP_Delay(ULONG Seconds,ULONG Micros)
{
struct MsgPort __aligned TimePort;
struct timerequest __aligned TimeRequest;
memset(&TimePort,0,sizeof(TimePort));
NewList(&TimePort . mp_MsgList);
TimePort . mp_Flags = PA_SIGNAL;
TimePort . mp_SigBit = SIGB_SINGLE;
TimePort . mp_SigTask = SysBase -> ThisTask;
memset(&TimeRequest,0,sizeof(TimeRequest));
TimeRequest . tr_node . io_Message . mn_ReplyPort = &TimePort;
if(!OpenDevice(TIMERNAME,UNIT_VBLANK,&TimeRequest,NULL))
{
TimeRequest . tr_node . io_Command = TR_ADDREQUEST;
TimeRequest . tr_time . tv_secs = Seconds;
TimeRequest . tr_time . tv_micro = Micros;
SetSignal(0,SIGF_SINGLE);
SendIO(&TimeRequest);
WaitIO(&TimeRequest);
CloseDevice(&TimeRequest);
}
}